home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / il / ilPolyWarp.z / ilPolyWarp
Encoding:
Text File  |  2002-10-03  |  9.6 KB  |  265 lines

  1.  
  2.  
  3.  
  4. iiiillllPPPPoooollllyyyyWWWWaaaarrrrpppp((((3333))))      IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll      iiiillllPPPPoooollllyyyyWWWWaaaarrrrpppp((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      iiiillllPPPPoooollllyyyyWWWWaaaarrrrpppp - two-dimensional 7-th degree warp
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      ilWarp
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <il/ilPolyWarp.h>
  16.  
  17. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      ilPolyWarp manages a two-dimensional n-th degree warp, where 1 <= n <= 7.
  19.  
  20.      AAAAddddddddrrrreeeessssssss TTTTrrrraaaannnnssssffffoooorrrrmmmmaaaattttiiiioooonnnn
  21.      The output image space is mapped to the input image space with an address
  22.      transform defined by two n-th degree polynomials (one for each spatial
  23.      dimension).  The structure _i_l_P_o_l_y_2_D (declared in <il/ilPolyDef.h>)
  24.      defines the degree and coefficients for both polynomials; the field names
  25.      are:
  26.  
  27.           ilPoly2D xc;
  28.           ilPoly2D yc;
  29.  
  30.  
  31.      The structure ilPoly2D has the following field names:
  32.  
  33.           int degree;
  34.           struct ilPolyCoeff2D c;
  35.  
  36.  
  37.      The _d_e_g_r_e_e field specifies the degree of the warp (one to seven).
  38.  
  39.      The structure ilPolyCoeff2D has the following fields:
  40.  
  41.           con,
  42.           y, x,
  43.           y2, xy, x2,
  44.           y3, xy2, x2y, x3,
  45.           y4, xy3, x2y2, x3y, x4,
  46.           y5, xy4, x2y3, x3y2, x4y, x5,
  47.           y6, xy5, x2y4, x3y3, x4y2, x5y, x6,
  48.           y7, xy6, x2y5, x3y4, x4y3, x5y2, x6y, x7
  49.  
  50.  
  51.      Depending on the degree, not all the fields of _i_l_P_o_l_y_C_o_e_f_f_2_D need to be
  52.      specified.  The seventh-degree address transform is implemented by the
  53.      equations:
  54.  
  55.           I(x) = cx.c.con + cx.c.y*y + cx.c.x*x + cx.c.y2*y^2 +
  56.                  cx.c.xy*x*y + cx.c.x2*x^2 + cx.c.y3*y^3 +
  57.                  cx.c.xy2*x*y^2 + cx.c.x2y*x^2*y + cx.c.x3*x^3 +
  58.                  cx.c.y4*y^4 + cx.c.xy3*x*y^3 + cx.c.x2y2*x^2*y^2 +
  59.                  cx.c.x3y*x^3*y + cx.c.x4*x^4 + cx.c.y5*y^5 +
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiillllPPPPoooollllyyyyWWWWaaaarrrrpppp((((3333))))      IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll      iiiillllPPPPoooollllyyyyWWWWaaaarrrrpppp((((3333))))
  71.  
  72.  
  73.  
  74.                  cx.c.xy4*x*y^4 + cx.c.x2y3*x^2*y^3 + cx.c.x3y2*x^3*y^2 +
  75.                  cx.c.x4y*x^4*y + cx.c.x5*x^5 + cx.c.y6*y^6 +
  76.                  cx.c.xy5*x*y^5 + cx.c.x2y4 + cx.c.x3y3*x^3*y^3 +
  77.                  cx.c.x4y2*x^4*y^2 + cx.c.x5y*x^5*y + cx.c.x6*x^6 +
  78.                  cx.c.y7*y^7 + cx.c.xy6*x*y^6 + cx.c.x2y5*x^2*y^5 +
  79.                  cx.c.x3y4*x^3*y^4 + cx.c.x4y3*x^4*y^3 +
  80.                  cx.c.x5y2*x^5*y^2 + cx.c.x6y*x^6*y + cx.c.x7*x^7
  81.  
  82.           I(y) = cy.c.con + cy.c.y*y + cy.c.x*x + cy.c.y2*y^2 +
  83.                  cy.c.xy*x*y + cy.c.x2*x^2 + cy.c.y3*y^3 +
  84.                  cy.c.xy2*x*y^2 + cy.c.x2y*x^2*y + cy.c.x3*x^3 +
  85.                  cy.c.y4*y^4 + cy.c.xy3*x*y^3 + cy.c.x2y2*x^2*y^2 +
  86.                  cy.c.x3y*x^3*y + cy.c.x4*x^4 + cy.c.y5*y^5 +
  87.                  cy.c.xy4*x*y^4 + cy.c.x2y3*x^2*y^3 + cy.c.x3y2*x^3*y^2 +
  88.                  cy.c.x4y*x^4*y + cy.c.x5*x^5 + cy.c.y6*y^6 +
  89.                  cy.c.xy5*x*y^5 + cy.c.x2y4 + cy.c.x3y3*x^3*y^3 +
  90.                  cy.c.x4y2*x^4*y^2 + cy.c.x5y*x^5*y + cy.c.x6*x^6 +
  91.                  cy.c.y7*y^7 + cy.c.xy6*x*y^6 + cy.c.x2y5*x^2*y^5 +
  92.                  cy.c.x3y4*x^3*y^4 + cy.c.x4y3*x^4*y^3 +
  93.                  cy.c.x5y2*x^5*y^2 + cy.c.x6y*x^6*y + cy.c.x7*x^7
  94.  
  95.  
  96.      where cx and cy are the coefficient vectors for x and y, respectively.
  97.      Once again, depending on the degree, not all the fields of cx and cy need
  98.      to be specified.  This polynomial defines the mapping from output image
  99.      coordinates to input image coordinates, that is, I(x) and I(y) define the
  100.      address in the input image space.
  101.  
  102. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
  103.      CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr
  104.  
  105.           ilPolyWarp(const ilPoly2D& xCoeff, const ilPoly2D& yCoeff)
  106.           ilPolyWarp(const ilAffine2D& xCoeff, const ilAffine2D& yCoeff)
  107.           ilPolyWarp(int degree=0)
  108.           ilPolyWarp(const ilAffineWarp& affine)
  109.  
  110.      GGGGeeeetttt////sssseeeetttt mmmmeeeetttthhhhooooddddssss
  111.  
  112.           void init(const ilPoly2D& xCoeff, const ilPoly2D& yCoeff)
  113.           void init(const ilAffine2D& xCoeff, const ilAffine2D& yCoeff)
  114.           void setDegree(int degree)
  115.           int getDegree()
  116.           const ilPoly2D& getCoeffX()
  117.           const ilPoly2D& getCoeffY()
  118.  
  119.  
  120. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  121.      iiiillllPPPPoooollllyyyyWWWWaaaarrrrpppp(((())))
  122.  
  123.           ilPolyWarp(const ilAffine2D& xCoeff, const ilAffine2D& yCoeff)
  124.           ilPolyWarp(const ilAffineWarp& affine)
  125.           ilPolyWarp(const ilPoly2D& xCoeff, const ilPoly2D& yCoeff)
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiillllPPPPoooollllyyyyWWWWaaaarrrrpppp((((3333))))      IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll      iiiillllPPPPoooollllyyyyWWWWaaaarrrrpppp((((3333))))
  137.  
  138.  
  139.  
  140.           ilPolyWarp(int degree=0)
  141.  
  142.  
  143.           Construct and initialize a new ilPolyWarp object.  Convenience
  144.           constructors allow the object to be initialized with affine warp
  145.           coefficients.
  146.  
  147.      ggggeeeettttCCCCooooeeeeffffffffXXXX(((())))
  148.  
  149.           const ilPoly2D& getCoeffX()
  150.  
  151.  
  152.           Return the coefficients for the x warp polynomial.
  153.  
  154.      ggggeeeettttCCCCooooeeeeffffffffYYYY(((())))
  155.  
  156.           const ilPoly2D& getCoeffY()
  157.  
  158.  
  159.           Return the coefficients for the y warp polynomial.
  160.  
  161.      ggggeeeettttDDDDeeeeggggrrrreeeeeeee(((())))
  162.  
  163.           int getDegree()
  164.  
  165.  
  166.           Return the degree of the warp.  It is defined to be the maximum of
  167.           the degrees of the two member polynomials.
  168.  
  169.      iiiinnnniiiitttt(((())))
  170.  
  171.           void init(const ilAffine2D& xCoeff, const ilAffine2D& yCoeff)
  172.           void init(const ilPoly2D& xCoeff, const ilPoly2D& yCoeff)
  173.  
  174.  
  175.           Initialize the coefficients of the polynomial.  If affine
  176.           coefficients are provided, then the degree is set to one.
  177.           Otherwise, the degree is set to the degree of the passed polynomial
  178.           structures.
  179.  
  180.      sssseeeettttDDDDeeeeggggrrrreeeeeeee(((())))
  181.  
  182.           void setDegree(int degree)
  183.  
  184.  
  185.           Set the degree of the polynomial.  This method is usually followed
  186.           by a call to the infer method on ilWarp to determine the polynomial
  187.           coefficients.
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. iiiillllPPPPoooollllyyyyWWWWaaaarrrrpppp((((3333))))      IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll      iiiillllPPPPoooollllyyyyWWWWaaaarrrrpppp((((3333))))
  203.  
  204.  
  205.  
  206. INHERITED MEMBER FUNCTIONS
  207.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllWWWWaaaarrrrpppp
  208.      compose(), copy(), dx(), dy(), dz(), eval(), evalVector(), findRoot(),
  209.      getBBox(), identity(), infer(), invert(), minimumNumberOfTies(),
  210.      operator(), warpChanged(), x(), y(), z()
  211.  
  212.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllWWWWaaaattttcccchhhheeeeddddOOOObbbbjjjjeeeecccctttt
  213.      addWatchCallback(), doWatchCallbacks(), removeWatchCallback()
  214.  
  215. SSSSEEEEEEEE AAAALLLLSSSSOOOO iiiillllWWWWaaaarrrrpppp,,,, iiiillllAAAAffffffffiiiinnnneeeeWWWWaaaarrrrpppp,,,, iiiillllPPPPoooollllyyyyDDDDeeeeffff....hhhh
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.                                                                         PPPPaaaaggggeeee 4444
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.